package com.imut.oa.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.imut.oa.pojo.dto.EmployeePageQueryDTO;
import com.imut.oa.pojo.entity.User;
import com.imut.oa.pojo.vo.EmployeeVO;
import org.apache.ibatis.annotations.Select;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface EmployeeMapper  extends BaseMapper<User> {

    Page<EmployeeVO> selectEmployeePage(
            Page<EmployeeVO> page,
            @Param("dto") EmployeePageQueryDTO dto
    );

    // 指定自定义 COUNT 方法
    Long selectEmployeePageCount(@Param("dto") EmployeePageQueryDTO dto);

    void updateEmoployee(User build);

    @Select("select * from user")
    List<User> getAllEmployee();

    // Page<EmployeeVo> selectEmployeePage(Page<EmployeeVo> page, @Param("dto") EmployeePageQueryDTO dto);
}